
import becker.robots.*;
public class Main {
	City city = new City(10,10);
	Robot r = new Robot(city,0,0,Direction.EAST);
	Light t = new Light(city,0,1);
	Light obj = null;
	
	public Main(){		
		r.move();
		if (r.canPickThing()){
			IIterate<Thing> i = city.examineThings();
			while (1 != 2){
			Light temp = (Light) i.next();
				if ((temp.getStreet() == t.getStreet()) && (temp.getAvenue() == t.getAvenue())){
					obj = temp;
					break;
				}
			}
			try {
				obj.flash(10);
			} catch (InterruptedException e1) {
				e1.printStackTrace();
			}
		}
		
		
		
	}
	public static void main (String[] args){
		new Main();
	}
}
